package com.disv.service.resp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;

/**
 * @desc: BaseResp
 * @author: Chao Zhang
 * @date: 2022/10/28 17:43
 */
@SuperBuilder(builderMethodName = "sBuilder")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BaseResp implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final String SUCCESS_CODE = "000000";
    public static final String SUCCESS_MSG = "OK";

    protected String code;

    protected String msg;

    protected String module;

    public boolean isSuccess() {
        return CommonRespCode.SUCCESS.getCode().equals(this.code);
    }

}
